<?php
include_once('../includes/definer.php');
include_once(INC.'admin/php/bootstrap.php');
include_once(INC.'admin/php/clases/Texto.php');
$results = array();
$categorias = Categoria::findAll();
foreach ($categorias as $categoria) {
    $n = array();
    $n['id'] = $categoria->id;
    $n['valor'] = utf8_encode($categoria->valor);
    $n['value'] = utf8_encode($categoria->value);
    $results[] = $n;
}
$results = json_encode($results);
header("Content-type: application/json");
echo($results);
?>